package P1000;

import java.util.Scanner;

/**
 * @author: zhouyang
 * @descrpition:
 * @time: 2019-10-07 13:05
 */
public class P1035_级数求和 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int k = scanner.nextInt();
        scanner.close();
        double sum = 0;
        double index =0d;
        while(sum<=k){
            sum += 1.0/++index;
        }
        System.out.printf("%.0f",index);
    }
}
